package com.xujinchen.base;

public class Demo06 {
    public static void main(String[] args) {
        //操作比较大数会溢出
        int money = 10_0000_0000;
        int years = 20;
        int total = money*years;//计算溢出
        long total2 =money*years;//转换前就已经有问题了
        System.out.println(total);
        System.out.println(total2);
        long total3 =money*((long)years);
        System.out.println(total3);
    }
}
